import request from '@/utils/request'

// 添加打卡记录
export function addPunchRecord(data) {
  return request({
    url: '/punch/punch/addPunchRecord',
    method: 'post',
    data: data
  })
}

// 查询打卡记录列表
export function listPunch(query) {
  return request({
    url: '/punch/punch/list',
    method: 'get',
    params: query
  })
}

// 查询打卡记录详细
export function getPunch(id) {
  return request({
    url: '/punch/punch/' + id,
    method: 'get'
  })
}

// 新增打卡记录
export function addPunch(data) {
  return request({
    url: '/punch/punch',
    method: 'post',
    data: data
  })
}

// 修改打卡记录
export function updatePunch(data) {
  return request({
    url: '/punch/punch',
    method: 'put',
    data: data
  })
}

// 删除打卡记录
export function delPunch(id) {
  return request({
    url: '/punch/punch/' + id,
    method: 'delete'
  })
}
